package com.iob.coin.po;

/**
 * @Author: MengYuxin
 * @Date: 2021/3/9 22:44
 * 表示一个三元组
 * 三元组的Id
 * 主--谓--宾
 */
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.List;

@Entity
@Table(name = "triple")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Triple {

    public Triple(int s_id, String predicate, int o_id, int kgID) {
        this.s_id = s_id;
        this.predicate = predicate;
        this.o_id = o_id;
        this.kgID = kgID;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "Id")
    private int Id;

    @Column(name = "s_id")
    private int s_id;

    @Column(name = "o_id")
    private int o_id;

    @Column(name = "predicate")
    private String predicate;

    @Column(name = "kgID")
    private int kgID;

}
